package com.fz.us.admin.company.entity;

import com.fz.us.admin.company.bean.FlowEnum;
import javax.persistence.*;

/**
 * 任务流程信息表
 * Created by ZhuChunXiao on 2017/2/6.
 */
@Entity
@Table(name="sys_taskflow")
public class TaskFlow  extends CompanyEntity {

    private static final long serialVersionUID = -4565039420242686964L;
    //任务实例表
    private TaskEntity taskEntity;
    //操作人
    private User user;
    //职责
    private Duty duty;
    //意见
    private String comment;
    //类型
    private FlowEnum.TaskFlowType type;
    //对应下一步的步骤简要表
    private StepBrief stepBrief;


    @ManyToOne(fetch = FetchType.LAZY)
    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    public Duty getDuty() {
        return duty;
    }

    public void setDuty(Duty duty) {
        this.duty = duty;
    }

    @Column(length = 5000)
    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    public TaskEntity getTaskEntity() {
        return taskEntity;
    }

    public void setTaskEntity(TaskEntity taskEntity) {
        this.taskEntity = taskEntity;
    }

    @Column(name="type", length = 10)
    @Enumerated(EnumType.STRING)
    public FlowEnum.TaskFlowType getType() {
        return type;
    }

    public void setType(FlowEnum.TaskFlowType type) {
        this.type = type;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    public StepBrief getStepBrief() {
        return stepBrief;
    }

    public void setStepBrief(StepBrief stepBrief) {
        this.stepBrief = stepBrief;
    }
}
